package JMU2.ti6;

import java.util.Arrays;
import java.util.Scanner;

/**
 * @author Lenovo
 */


public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNextInt()) {
            int n = scanner.nextInt();
            String[][] arr = new String[n][n];
            for (int i = 0; i < n; i++) {
                for (int j = 0; j <= i; j++) {
                    String str = (i + 1) + "*" + (j + 1) + "=" + (i + 1) * (j + 1);
                    System.out.print(str);
                    arr[i][j] = str;
                    if (j < i){
                        int space = Math.max((7 - str.length()), 0);
                        for (int k = 0; k < space; k++) {
                            System.out.print(" ");
                        }
                    }
                }
                System.out.println();
            }
            System.out.println(Arrays.deepToString(arr).replace(", null",""));
        }
    }
}
